#ifndef __DRV_L1_INTERRUPT_H__
#define __DRV_L1_INTERRUPT_H__

#ifdef __cplusplus
extern "C"
{
#endif
#include "project.h"

#define VIC_I2C1			14
#define VIC_CSI1			15
#define VIC_HMS				17
#define VIC_SCH				18
#define VIC_TMB_C			19
#define VIC_TMB_B			20
#define VIC_EXT_C			21
#define VIC_EXT_B			22
#define VIC_TIMER7			23
#define VIC_TIMER6			24
#define VIC_SPI1			25
#define VIC_UART1			26
#define VIC_MIPI_B			27
#define VIC_TIMER5			28
#define VIC_EHCI			29
#define VIC_OHCI			30
#define VIC_PSCALER_B		31
#define VIC_PSCALER_A		32
#define VIC_ALM				33
#define VIC_TMB_A			34
#define VIC_RTC				35
#define VIC_CPUACC_REV		36
#define VIC_CONV420TO422	37
#define VIC_EXT_A			38
#define VIC_KEY_CHANGE		39
#define VIC_I2C0			40
#define VIC_TIMER3			41
#define VIC_TIMER2			42
#define VIC_SD1				43
#define VIC_ISP				44
#define VIC_SPI0			45
#define VIC_UART0			46
#define VIC_ADCF			47
#define VIC_MIPI			48
#define VIC_TIMER1			49
#define VIC_TIMER4			50
#define VIC_SD0				51
#define VIC_JPEG1			52
#define VIC_USBD			53
#define VIC_SCALAR0			54
#define VIC_JPEG0			55
#define VIC_DMA				56
#define VIC_TIMER0			57
#define VIC_CSI0			58
#define VIC_PPU				59
#define VIC_I2SRX			60
#define VIC_SAR_ADC			61
#define VIC_AUDB			62
#define VIC_AUDA			63
#define VIC_ROT				64
#define VIC_MAX_IRQ			65	// Don't forget to modify this when new interrupt source is added
#define VIC_SPU_PW			1
#define VIC_SPU_BEAT		2
#define VIC_SPU_ENV			3
#define VIC_SPU_FIQ			4
#define VIC_MAX_FIQ			5	// Don't forget to modify this when new fast interrupt source is added
extern INT32U	vic_global_mask_set(void);
extern void		vic_global_mask_restore(INT32U old_mask);
extern INT32S	vic_irq_register(INT32U vic_num, void (*isr) (void));
extern INT32S	vic_irq_unregister(INT32U vic_num);
extern INT32S	vic_irq_enable(INT32U vic_num);
extern INT32S	vic_irq_disable(INT32U vic_num);
extern INT32S	vic_fiq_register(INT32U vic_num, void (*isr) (void));
extern INT32S	vic_fiq_unregister(INT32U vic_num);
extern INT32S	vic_fiq_enable(INT32U vic_num);
extern INT32S	vic_fiq_disable(INT32U vic_num);
extern void		vic_init(void);

#ifdef __cplusplus
}

#endif
#endif // __DRV_L1_INTERRUPT_H__
